:root {
  /* Colors */
  --daijh-color-white: #ffffff;
  --daijh-color-success: #67c23a;
  --daijh-color-warning: #e6a23c;
  --daijh-color-danger: #f56c6c;
  --daijh-color-error: #f56c6c;
  --daijh-color-info: #909399;
  /* Background Colors */
  --daijh-bg-color-overlay: #ffffff;
  /* Text Colors */
  --daijh-text-color-primary: #303133;
  --daijh-text-color-regular: #606266;
  --daijh-text-color-secondary: #909399;
  /* Border Colors */
  --daijh-border-color-lighter: #ebeef5;
  /* Box Shadow */
  --daijh-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, 0.12);
  /* Font */
  --daijh-font-size-base: 14px;
  /* Transition */
  --daijh-transition-duration: 0.3s;
  /* Notification Specific Variables */
  --daijh-notification-width: 330px;
  --daijh-notification-padding: 14px 26px 14px 13px;
  --daijh-notification-radius: 8px;
  --daijh-notification-shadow: var(--daijh-box-shadow-light);
  --daijh-notification-border-color: var(--daijh-border-color-lighter);
  --daijh-notification-icon-size: 24px;
  --daijh-notification-close-font-size: 16px;
  --daijh-notification-group-margin-left: 13px;
  --daijh-notification-group-margin-right: 8px;
  --daijh-notification-content-font-size: var(--daijh-font-size-base);
  --daijh-notification-content-color: var(--daijh-text-color-regular);
  --daijh-notification-title-font-size: 16px;
  --daijh-notification-title-color: var(--daijh-text-color-primary);
  --daijh-notification-close-color: var(--daijh-text-color-secondary);
  --daijh-notification-close-hover-color: var(--daijh-text-color-regular);
}

@keyframes daijh-progress-shrink {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

.daijh-notification {
  display: flex;
  width: var(--daijh-notification-width);
  padding: var(--daijh-notification-padding);
  border-radius: var(--daijh-notification-radius);
  box-sizing: border-box;
  border: 1px solid var(--daijh-border-color-lighter);

  /* [關鍵修復] position 必須是 fixed 才能相對於視窗定位 */
  position: fixed;

  overflow: hidden;
  border-left: 6px solid transparent;
  background-color: var(--daijh-bg-color-overlay);
  box-shadow: var(--daijh-notification-shadow);
  overflow-wrap: anywhere;
  z-index: 9999;

  /* [已移除] 刪除了 transition 屬性，避免與 jQuery.animate 衝突 */
}

.daijh-notification.has-progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background-color: var(--progress-bar-color, var(--daijh-color-info));
  animation-name: daijh-progress-shrink;
  animation-timing-function: linear;
  animation-duration: var(--daijh-notification-duration);
}

.daijh-notification__group {
  margin-left: var(--daijh-notification-group-margin-left);
  margin-right: var(--daijh-notification-group-margin-right);
}

.daijh-notification__title {
  font-weight: 700;
  font-size: var(--daijh-notification-title-font-size);
  line-height: var(--daijh-notification-icon-size);
  color: var(--daijh-notification-title-color);
  margin: 0;
}

.daijh-notification__content {
  font-size: var(--daijh-notification-content-font-size);
  line-height: 24px;
  margin: 6px 0 0;
  color: var(--daijh-notification-content-color);
  text-align: justify;
}

.daijh-notification__content p {
  margin: 0;
}

.daijh-notification .daijh-notification__icon {
  height: var(--daijh-notification-icon-size);
  width: var(--daijh-notification-icon-size);
  font-size: var(--daijh-notification-icon-size);
}

.daijh-notification .daijh-notification__closeBtn {
  position: absolute;
  top: 18px;
  right: 15px;
  cursor: pointer;
  color: var(--daijh-notification-close-color);
  font-size: var(--daijh-notification-close-font-size);
}

.daijh-notification .daijh-notification__closeBtn:hover {
  color: var(--daijh-notification-close-hover-color);
}

.daijh-notification--success {
  border-left-color: var(--daijh-color-success);
}

.daijh-notification--success.has-progress-bar::after {
  background-color: var(--daijh-color-success);
}

.daijh-notification .daijh-notification--success {
  color: var(--daijh-color-success);
}

.daijh-notification--info {
  border-left-color: var(--daijh-color-info);
}

.daijh-notification--info.has-progress-bar::after {
  background-color: var(--daijh-color-info);
}

.daijh-notification .daijh-notification--info {
  color: var(--daijh-color-info);
}

.daijh-notification--warning {
  border-left-color: var(--daijh-color-warning);
}

.daijh-notification--warning.has-progress-bar::after {
  background-color: var(--daijh-color-warning);
}

.daijh-notification .daijh-notification--warning {
  color: var(--daijh-color-warning);
}

.daijh-notification--error {
  border-left-color: var(--daijh-color-error);
}

.daijh-notification--error.has-progress-bar::after {
  background-color: var(--daijh-color-error);
}

.daijh-notification .daijh-notification--error {
  color: var(--daijh-color-error);
}

.daijh-icon {
  --color: inherit;
  height: 1em;
  width: 1em;
  line-height: 1em;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
  fill: currentColor;
  color: var(--color);
  font-size: inherit;
}